#ifndef OWL_NETWORK_H_
#define OWL_NETWORK_H_
#include "common.h"
#include "network_state.h"
#include "layer.h"

typedef enum LearningRatePolicy {
    CONSTANT, STEP
} LearningRatePolicy;

typedef struct Network
{
    Float *data_workspace;
    Layer *layers;
    int layer_count;
    int batch;
    int *seen;
    Float epoch;
    int subdivisions;
    Float momentum;
    Float decay;

    int outputs;
    LearningRatePolicy learing_rate_policy;

    Float learing_rate;
    Float gamma;
    Float scale;
    Float power;
    int time_steps;
    int step;
    int max_batches;
    Float *scales;
    int *steps;
    int num_steps;
    int burn_in;
    int inputs;
    int h;
    int w;
    int c;
    int max_crop;
    int min_crop;
} Network;


Network MakeNetwork(int n);
void ForwardNetwork(Network net, NetworkState state);
void BackwardNetwork(Network net, NetworkState state);
void UpdateNetwork(Network net);

Float TrainNetwork(Network net);
Float TrainNetworkDatum(Network net, Float *x, Float *y);

#endif //OWL_MATH_H_
